/*
	File:		TileManager.h
	Author:		A. O'Steen
	Course:		SGP1
	Purpose:	The Tile manager class will store all layers (which store tiles)
				and render the layers in order.
*/

#pragma once

#include <list>
#include <string>
using namespace std;

//Forward Declarations
class Layer;
class InteractivityLayer;

//#include "Layer.h"
//#include "InteractivityLayer.h"


class TileManager
{

public:
	//Singleton
	static TileManager* GetInstance( void );
	static void			DeleteInstance( void );

	//Tile Managment
	void AddLayer( Layer* );
	void RemoveLayer( Layer* );

	bool LoadMap( const char *);
	bool LoadSaveFile( char * );
	void Unload( void );

	void Update( float fElapsedTime);
	void Render( void );

	
public:
	TileManager(void);
	~TileManager(void);
private:
	//For security purposes
	TileManager( const TileManager&);
	TileManager& operator = ( const TileManager&);

private:

	static TileManager*			s_pInstance;
	typedef std::list<Layer*>	LayerList;

	string						m_sMapName;
	LayerList					m_lLayers;
	bool						m_bIterating;
	InteractivityLayer *		m_InteractiveLayer;
};

